`:top
`!Object Query Language`! (`!OQL`!) is a `F33f`_`[query language`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Query_language]`_`f standard for `F33f`_`[object-oriented databases`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Object_database]`_`f modeled after `F33f`_`[SQL`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=SQL]`_`f and developed by the `F33f`_`[Object Data Management Group`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Object_Data_Management_Group]`_`f (ODMG). Because of its overall complexity the complete OQL standard has not yet been fully implemented in any software. The OQL standard influenced the design of later query languages such as JDOQL and `F33f`_`[EJB QL`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=EJB_QL]`_`f, though none are considered to be any version of OQL.
>>Contents
• `F0af`_`[General rules`#general-rules]`_`f
• `F0af`_`[Examples`#examples]`_`f
• `F0af`_`[Simple query`#simple-query]`_`f
• `F0af`_`[Query with grouping and aggregation`#query-with-grouping-and-aggregation]`_`f
• `F0af`_`[References`#references]`_`f
• `F0af`_`[See also`#see-also]`_`f
• `F0af`_`[References`#references]`_`f
-─
>>General rules
The following rules apply to OQL statements:
• All complete statements must be terminated by a semi-colon.
• A list of entries in OQL is usually separated by commas but not terminated by a comma(,).
• Strings of text are enclosed by matching quotation marks.
>>Examples
>>>Simple query
The following example illustrates how one might retrieve the `F33f`_`[CPU`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=CPU]`_`f-speed of all PCs with more than 64MB of `F33f`_`[RAM`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Random-access_memory]`_`f from a fictional `F33f`_`[PC`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Personal_computer]`_`f database:
`B100`F9d9SELECT pc.cpuspeed`f`b
`B100`F9d9FROM PCs pc`f`b
`B100`F9d9WHERE pc.ram > 64;`f`b
>>>Query with grouping and aggregation
The following example illustrates how one might retrieve the average amount of `F33f`_`[RAM`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Random-access_memory]`_`f on a `F33f`_`[PC`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Personal_computer]`_`f, grouped by manufacturer:
`B100`F9d9SELECT manufacturer, AVG(SELECT part.pc.ram FROM partition part)`f`b
`B100`F9d9FROM PCs pc`f`b
`B100`F9d9GROUP BY manufacturer: pc.manufacturer;`f`b
Note the use of the keyword `B100`F9d9partition`f`b, as opposed to aggregation in traditional SQL.
>>References
• `:citerefdietrichurban2022`aDietrich, Suzanne; Urban, Susan (31 May 2022). "2.4 The ODMG Query Language". `*Fundamentals of Object Databases`*. `F33f`_`[Springer Nature`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Springer_Nature]`_`f. pp. 31–52. `F33f`_`[ISBN`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=ISBN_(identifier)]`_`f 978-3-031-01844-2.
• `:citerefcattellbarryberler2000`aCattell, Roderic Geoffrey Galton; Barry, Douglas K.; Berler, Mark (2000). "Object Query Language". `*The Object Data Standard: ODMG 3.0`*. `F33f`_`[Morgan Kaufmann`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Morgan_Kaufmann]`_`f. pp. 89–152. `F33f`_`[ISBN`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=ISBN_(identifier)]`_`f 978-1-55860-647-0. Retrieved 31 March 2025.</ref>
>>See also
• `F33f`_`[Object Data Management Group`:/page/wikibook/entry.mu`zim=wikipedia_en_all_nopic_2025-08.zim|entry_path=Object_Data_Management_Group]`_`f (ODMG)
• Object Definition Language
>>References
`c`F0af`_`[↑ Back to top`#top]`_`f`a